﻿using Entities;
using Logger4Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Utilities;

namespace Hubberly
{
   public class WorldInfoCity
   {
      //////////////////////////////////////////////////////////////////////////
      //
      public WorldInfoCity(City city)
      {
         city_ = city;
      }

      //////////////////////////////////////////////////////////////////////////
      //
      public int population
      {
         get { return population_; }
         set { population_ = value; }
      }

      //////////////////////////////////////////////////////////////////////////
      //
      public City city
      {
         get { return city_; }
      }

      //////////////////////////////////////////////////////////////////////////
      //
      public Dictionary<Factory, int> factories
      {
         get { return factories_; }
      }

      //////////////////////////////////////////////////////////////////////////
      //
      public void setFactory(Factory factory, int count)
      {
         if (!factories_.ContainsKey(factory))
         {
            factories_.Add(factory, count);
         }
         else
         {
            factories_[factory] = count;
         }
      }

      //////////////////////////////////////////////////////////////////////////
      //
      private static Logger logger_ = new Logger(typeof(WorldInfoCity));
      private int population_;
      private City city_;
      private Dictionary<Factory, int> factories_ = new Dictionary<Factory, int>();
      private Dictionary<Material, KeyValuePair<int, int>> materials_ = new Dictionary<Material, KeyValuePair<int, int>>();
   }
}
